package cn.damai.search.baseService.ipml;

import cn.damai.model.SchedulerSeatPrice;
import cn.damai.search.baseService.BaseSchedulerSeatPriceService;
import cn.damai.search.mapper.SchedulerSeatPriceMapper;
import cn.damai.util.DubboUtil;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Component
@Service(version = DubboUtil.VRESION,group = DubboUtil.GROUP)
public class BaseSchedulerSeatPriceServiceIpml implements BaseSchedulerSeatPriceService {

    @Autowired
    private SchedulerSeatPriceMapper schedulerSeatPriceMapper;

    @Override
    public SchedulerSeatPrice getSchedulerSeatPriceById(@RequestParam Long id){
        return  schedulerSeatPriceMapper.getSchedulerSeatPriceById(id);
    }

    @Override
    public List<SchedulerSeatPrice>	getSchedulerSeatPriceListByMap(@RequestParam Map<String,Object> param){
        return schedulerSeatPriceMapper.getSchedulerSeatPriceListByMap(param);
    }

    @Override
    public Integer getSchedulerSeatPriceCountByMap(@RequestParam Map<String,Object> param){
        return schedulerSeatPriceMapper.getSchedulerSeatPriceCountByMap(param);
    }

    @Override
    public Integer qdtxAddSchedulerSeatPrice(@RequestParam SchedulerSeatPrice SchedulerSeatPrice){
        SchedulerSeatPrice.setCreatedTime(new Date());
        return schedulerSeatPriceMapper.insertSchedulerSeatPrice(SchedulerSeatPrice);
    }

    @Override
    public Integer qdtxModifySchedulerSeatPrice(@RequestParam SchedulerSeatPrice SchedulerSeatPrice){
        SchedulerSeatPrice.setUpdatedTime(new Date());
        return schedulerSeatPriceMapper.updateSchedulerSeatPrice(SchedulerSeatPrice);
    }
}
